1. Field of the Invention
The present invention relates generally to a packet transfer apparatus for transmitting and/or receiving event sequence data such as audio data and music data over a fast serial network to which a plurality of devices are connected.
2. Description of Related Art
A technology of transmitting audio data such as voice and tone and MIDI data over an IEEE 1394 serial network configured by sequentially coupling a plurality of electronic musical instruments and audio equipment units with cables is known as xe2x80x9cAudio and Music Data Transmission Protocol, Version 1.0, 1997-5, 1394 Trade Association.xe2x80x9d
Referring to FIG. 10, there is shown a diagram illustrating flows of packets over a network. This network has three transmitting nodes 101, 102, and 103 and one-receiving node 104. In this example, audio data inputted from peripheral devices at these transmitting nodes 101, 102 and 103 are reproduced by a peripheral device at this receiving node 104. The transmitting nodes 101, 102, and 103 each send a packet or packets. The receiving node 104 receives these packets and reproduces, at a predetermined sampling rate, the audio data contained in the packet received from desired one of the transmitting nodes. References 105a through 105d denote packets supplied from-the transmitting A node 101, 106a through 106c denote packets supplied from the transmitting B node 102, and 107 denotes a packet supplied from the transmitting C node 103.
The timing of the entire network is controlled by a cycle master node (not shown). The cycle master node sends cycle start packets in every 125 microseconds to the other nodes. Every time the nodes receive a cycle start packet, each node is synchronized with the cycle master node by setting the cycle timer in each node by the absolute time information contained in the cycle start packet.
Each of the transmitting nodes 101, 102, and 103 generates a timestamp (abbreviated as xe2x80x9csytxe2x80x9d), one in every 8 sampling clocks (or 8 data blocks), on the basis of the time provided by the cycle timer, for )the audio data reproduced at a predetermined sampling clock by a peripheral device connected to that transmitting node. Each transmitting node also arranges audio data of one or more channels into a data field and arranges the associated timestamp into a syt field so as to form a packet composed of the data field and the syt field, and sends the packet. The timestamp specifies the reproduction time at the receiving side of an event sequence (or an audio channel). DBC (Data Block Count) indicates the total number of data blocks sent so far. Each of the data blocks is generally made up of data of two or more event sequences generated at the same sampling time.
Referring to FIG. 11, there is shown a diagram illustrating a packet format for use at isochronous transmission. Isochronous transmission denotes a mode of data transmission defined in the link layer of IEEE 1394. In this transmission mode, a transmission delay is compensated and each node is allocated with a communication band in advance. The packet format is made up of an isochronous header, a CIP (Common Isochronous Packet format) header, and a data field having basically a width of 32 bits. The isochronous header includes sub-fields of data length, tag, channel (isochronous transmission channel), xe2x80x9c1010xe2x80x9d bit train (tcode) indicative of isochronous data packet, synchronization (sync), and header CRC (Cyclic Redundancy Check).
The CIP header contains various items necessary for a receipt operation, such fields as DBS (Data Block Size), DBC (Data Block Count), and syt. The syt field of a packet having no timestamp is written with xe2x80x9cno dataxe2x80x9d value. The data field contains audio data and MIDI data. Available for the data format of the data field are (1) AM824 generic format, (2) AM824 IEC958 conformant, (3) AM824 Raw audio, (4) AM824 MIDI conformant, (5) 32-bit Data format, and (6) 24*4 Audio pack format.
Referring to FIG. 12, there is shown an operational diagram illustrating isochronous transmission. Particularly, this diagram shows a transmission control operation. In the example shown in FIG. 10, a timestamp is attached to every 8 data blocks (at every 8 sampling clocks). In the example of FIG. 12, a timestamp is attached to every 4 data blocks (at every 4 sampling clock) and sampling frequency Fs is 26.7 KHz. The upper half part shows the transmit side, in which an event sequence (sampling data) is created. The lower half part shows the receive side, in which the event sequence (sampling data) is reproduced. In the middle part, packets are shown. In this example, sampling data reproduced with a predetermined sampling clock are generated as an event sequence in the transmitting node. The cycle timer of the transmitting node outputs a time value. The transmitting node generates an allocated band of data blocks once every nominal isochronous cycle (125 microseconds), attaches a timestamp in taking account of a transmission delay to each packet, and sends the resultant packets.
A first packet contains DBC=3 (namely, 3 data blocks have already been transmitted) and syt=R1, along with 3 data blocks. A second packet contains DBC=6 (namely, 6 data blocks have already been transmitted) and syt=R2 in predetermined fields, along with 4 data blocks. Likewise, third through fifth packets are transmitted. However, the fourth packet has no timestamp because this packet does not contain a data block of a sampling clock corresponding to the timestamp interval.
Each packet is received with a certain transfer delay by the receiving node. Then, the receiving node generates a reproduction sampling clock. Referring to FIG. 12, an item xe2x80x9cINDEXxe2x80x9d denotes a value indicative of a particular data block included in the packet and corresponding to the time of timestamp interval. This value (0, 1, 2 or 3) is obtained by performing computation on the DBC value and the timestamp interval.
Referring back to FIG. 10, value DBC=3 is added to the packet 105a to be transmitted by the transmitting A node 101. DBC=7 and syt=1000 are added to the packet 105b. The data, block having the same time as the time of syt=1000 is DA0. DBC=16 and syt=9000 are added to the packet 105d. The data block having the same time as the time of syt=9000 is DA8. Data block DA8 is located 8 data blocks after DA0. On the other hand, values DBC=7 and syt=7000 are added to the packet 106a to be transmitted from the transmitting B node 102. DBC=12 is added to the packet 106b. Values DBC=16 and syt=F000 are added to the packet 106c. 
One to three cables of IEEE 1394 are connected in each node to a physical layer IC (Integrated Circuit) of the physical layer. The physical layer IC is connected to a link layer controller IC that provides the link layer. The link layer controller IC is connected to an LSI (Large Scale Integration, hereafter referred to as a packet handler) for transmission of IEEE 1394 digital audio/MIDI. The packet handler executes the above-mentioned Audio and Music Data Transmission Protocol. In the transmission of event sequence data such as realtime audio and music data in the packet format of isochronous transmission mode, the time in which packets arrive at the receiving node and the interval of reception of these packets are not constant, because this mode is not synchronous. Therefore, it becomes necessary to regulate the reproduction of the received packets to the time specified by the transmit side and to output the reproduced audio data to a peripheral sound device in synchronization with the input sampling clock of the transmit side.
It is therefore an object of the present invention to provide a packet transfer apparatus for receiving packets containing event sequence data and generating a reproduction sampling clock.
It is another object of the present invention to provide a packet transfer apparatus for receiving packets containing event sequence data and reproducing them in synchronization with a time specified by the transmit side.
It is still another object of the present invention to provide a packet transfer apparatus for receiving packets containing event sequence data including audio and music data and adjusting, in association with each transmitting node, a reproduction time specified by a timestamp supplied from each transmitting node.
It is further another object of the present invention to provide a packet transfer apparatus capable of coping with occurrence of errors.
It is yet another object of the present invention to provide a packet transfer apparatus for sending and receiving packets containing event sequence data. When this packet transfer apparatus is used in plurality, a common reproduction timing clock can be shared among them.
It is a different object of the present invention to provide a packet transfer apparatus capable of sending and receiving, in a simple manner, packets containing sampling data having a sampling frequency two times as high as ordinary sampling frequency.
It is still different object of the present invention to provide a packet transfer apparatus for receiving packets each containing plural trains of event sequence data and changing output channels through which these event sequence data are outputted.
According to the invention, a packet receiving apparatus has a plurality of receiving buffers to receive packets from a plurality of transmitting nodes located on a network for reproduction of event sequence data through output channels, the packet containing at least one data block composed of at least one event sequence data and a timestamp added per a predetermined number of data blocks. The apparatus comprises an unpacketizing section that extracts the event sequence data and the timestamp from the packet, a writing section that distributes the extracted event sequence data to the plurality of the receiving buffers for writing the event sequence data into the receiving buffers, and a reading section that reads out the event sequence data from the receiving buffers in accordance with the extracted timestamp.
Preferably, the plurality of the receiving buffers are separately allotted to the plurality of the transmitting nodes and are further assigned to channels of the event sequence data contained in each packet from each transmitting node, and the writing section distributes the event sequence data of one packet from one transmitting node to a corresponding one of the receiving buffers according to information which is contained in said one packet and which identifies said one transmitting node and the channel.
Preferably, the packet receiving apparatus further comprises a patch section that allocates the event sequence data read from the receiving buffers to the output buffers according to either of header information contained in the packet and setting information inputted from outside.
Preferably, the reading section includes a time adjusting section that operates when a target time indicated by the timestamp extracted from one packet coincides with a current time indicated by an internal cycle timer for reading out the event sequence data extracted from said one buffer and written in the receiving buffer to thereby adjusting a reproduction timing of the event sequence data by the timestamp.
According to the invention, a packet receiving apparatus has a plurality of receiving buffers to receive packets from a plurality of transmitting nodes located on a network for reproduction of event sequence data, the packet containing at least one data block composed of at least one event sequence data and a timestamp added per a predetermined number of data blocks. The apparatus comprises a timestamp output section that selects a predetermined one of packets which are received sequentially for retrieving a timestamp contained in the predetermined packet, a reproduction timing clock generating section that generates a reproduction timing clock used for synchronously reproducing the event sequence data contained in the sequentially received packets, a comparing section that compares a time indicated by the timestamp retrieved from the predetermined packet with a current time indicated by an internal cycle timer so as to phase-lock the reproduction timing clock to the time of the timestamp, and a data output section that reproduces the event sequence data contained in the sequentially received packets in synchronization to the reproduction timing clock.
Preferably, the timestamp output section selects a predetermined packet which is transmitted from a specific one of the transmitting nodes, and retrieves the timestamp from the selected packet to provide the retrieved timestamp to the comparing section.
Preferably, the timestamp output section comprises a first timestamp output section that retrieves a timestamp contained in a predetermined packet which is transmitted from a specific one of the transmitting nodes, and a second timestamp output section that retrieves another timestamp contained in a packet which is transmitted form other transmitting node than the specific transmitting node. The comparing section comprises a first comparing section that operates when a time indicated by the timestamp retrieved by the first timestamp output section coincides with the current time of the internal cycle timer for enabling the data output section to produce the event sequence data which is contained in the predetermined packet of the specific transmitting node and which corresponds to the timestamp retrieved by the first timestamp output section, and a second comparing section that operates when a time indicated by the timestamp retrieved by the second timestamp output section coincides with the current time of the internal cycle timer for enabling the data output section to produce the event sequence data which is contained in the packet of the other transmitting node than the specific transmitting node and which corresponds to the timestamp retrieved by the second timestamp output section.
According to the invention, a packet receiving apparatus has a plurality of data buffers to receive packets from a plurality of transmitting nodes located on a network for reproduction of event sequence data, the packet containing at least one data block composed of at least one event sequence data and a timestamp added per a predetermined number of data blocks. The apparatus comprises a pair of first and second timestamp buffers, an unpacketizing section that extracts event sequence data and timestamps from received packets, a writing section that distributes the extracted event sequence data to the plurality of the data buffers for writing the event sequence data into the data buffers, the writing section further writing a timestamp extracted from a particular packet into the first timestamp buffer and writing other timestamp extracted from other packet than the particular packet into the second timestamp buffer, and a reading section that reads out the event sequence data from the data buffers in accordance with the timestamps written in the first timestamp buffer and the second timestamp buffer.
Preferably, the packet receiving apparatus further comprises a reproduction timing clock generating section that generates a reproduction timing clock used for synchronous reproduction of the event sequence data from each of the packets, and a comparing section that compares a time indicated by the timestamp extracted from the particular packet transmitted from a particular one of the transmitting node and written into the first timestamp buffer with a current time indicated by an internal cycle timer for phase-locking the reproduction timing clock. The reading section reproduces the event sequence data from the data buffers in synchronization to the reproduction timing clock.
Preferably, the reading section includes a time adjusting section that operates when the time indicated by the timestamp written in the first timestamp buffer coincides with the current time indicated by the internal cycle timer for reading out first event sequence data of the particular packet from the data buffer to thereby adjust reproduction timing of the first event sequence data by the timestamp written in the first timestamp buffer, and that operates when the time indicated by the timestamp written in the second timestamp buffer coincides with the current time indicated by the internal cycle timer for reading out second event sequence data of the other packet than the particular packet from the data buffer to thereby adjust reproduction timing of the second event sequence data by the timestamp written in the second timestamp buffer.
According to the invention, a packet receiving apparatus is provided on a receiving node for receiving packets from a plurality of transmitting nodes located on a network, the packet containing at least one data block composed of at least one event sequence data and a timestamp added per a predetermined number of data blocks. The apparatus comprises a timestamp output section that retrieves a timestamp contained in a packet received from a transmitting node, a data output section that reproduces event sequence data contained in the same packet received from the transmitting node, an offset setting section that sets an offset time for the receiving node relative to the transmitting node and adds the offset time to a time indicated by the timestamp retrieved by the timestamp output section, and a reproduction time control section that operates when the time of the timestamp added with the offset time coincides with a current time indicated by an internal cycle timer for controlling the data output section to effect synchronous reproduction of the event sequence data contained in the same packet as the timestamp.
Preferably, the timestamp output section has a first timestamp buffer for storing a primary timestamp retrieved from a packet which is transmitted from a particular one of the transmitting nodes, and a second timestamp buffer for storing a secondary timestamp retrieved from another packet which is transmitted from other transmitting node than the particular transmitting node. The offset setting section adds the time indicated by the primary timestamp with an offset time set relative to the particular transmitting node, and adds the time indicated by the secondary timestamp with another offset time set relative to the other transmitting node.
Preferably, the timestamp output section adds an offset time, which is set by operating an external input provided on the receiving node, to the time indicated by the timestamp.
According to the invention, a packet receiving apparatus receives a packet from a transmitting node located on a network, the packet containing at least one data block composed of at least one event sequence data and a timestamp added per a predetermined number of data blocks. The apparatus comprises a reproduction timing clock generating section that generates a reproduction timing clock used for synchronous reproduction of the event sequence data contained in the packet based on the timestamp contained in the packet, an output terminal provided for outputting the generated reproduction timing clock externally, an input terminal provided for inputting an external reproduction timing clock, a data output section that reproduces event sequence data contained in the packet received from the transmitting node in synchronization to either of the generated reproduction timing clock and the external reproduction timing clock, and a reproduction timing clock setting section that operates in a first mode for feeding the reproduction timing clock generated by the reproduction timing clock generating section to the data output section and to the output terminal, and that operates in a second mode for feeding the external reproduction timing clock inputted from the input terminal to the data output section.
According to the invention, a packet receiving apparatus comprises a plurality of packet handlers including a master packet handler and a slave packet hander for cooperatively receiving packets from transmitting nodes located on a network, the packet containing at least one data block composed of at least one event sequence data and a timestamp added per a predetermined number of data blocks. Each packet handler comprises an unpacketizing section that extracts the event sequence data and the timestamp from the packet, a receiving buffer that is provided for temporarily storing the event sequence data, a writing section that writes the extracted event sequence data into the receiving buffer, and a reading section that reads out the event sequence data from the receiving buffer in synchronization to a reproduction timing clock to reproduce the event sequence data. The master packet handler generates the reproduction timing clock in accordance with the extracted timestamp and provides the generated reproduction timing clock to the slave packet handler. The master packet handler operates when the receiving buffer has no space to store the event sequence data for allocating the event sequence data to the receiving buffer of the slave packet handler.
According to the invention, a packet transmitting apparatus transmits packets to receiving nodes located on a network, the packet containing at least one data block composed of at least one event sequence data and a timestamp added per a predetermined number of data blocks. The packet transmitting apparatus comprises a packetizing section that arranges the event sequence data into data blocks and adds thereto a timestamp so as to sequentially produce packets, a transmitting section that sequentially transmits the packets, and an error processing section that operates when an error is detected during production of the packets for stopping transmission of a regular packet containing event sequence data and for generating and transmitting a special packet containing a message indicative of occurrence of the error.
Preferably, the error processing section includes an computation section that computes an input timing period of the data block based on a time of the timestamp, so that the error processing section operates when the computed input timing period deviates from a predetermined time period over an allowable range for detecting the error.
According to the invention, a packet receiving apparatus has a receiving buffer to receive packets from transmitting nodes located on a network for reproduction of event sequence data, the packet containing at least one data block composed of at least one event sequence data and a timestamp added per a predetermined number of data blocks. The apparatus comprises an unpacketizing section that extracts the event sequence data and the timestamp from the packet, a writing section that writes the extracted event sequence data into the receiving buffer, a reading section that reproduces the event sequence data from the receiving buffer in synchronization to the extracted timestamp, and an error processing section that operates when detecting occurrence of a timing error based on the extracted timestamp and other error in either of the writing section and the reading section for muting synchronous reproduction of the event sequence data.
According to the invention, a packet transmitting apparatus transmits packets to receiving nodes located on a network, the packet containing at least one data block composed of at least one event sequence data and a timestamp added per a predetermined number of data blocks. The packet transmitting apparatus comprises an input section that sequentially inputs event sequence data from an external data source in response to an input clock signal having a leading edge and a trailing edge arranged at a predetermined period, a fast packetizing section that generates a packet of the inputted event sequence data in response to the leading edge of the input clock signal and generates another packet in response to the trailing edge subsequent to the leading edge, thereby successively generating packets at a rate twice as fast as the input clock signal, and that adds the timestamp every time the predetermined number of data blocks are packetized, and a transmitting section that sequentially transmits the packets generated by the fast packetizing section.
Preferably, the input section sequentially inputs event sequence data which is sampled at a double rate by a sampling clock signal having a half period of the input clock signal.
Preferably, the input section can switch between a fast sampling mode where the event sequence data is sampled at a double rate by a sampling clock signal having a half period of the input clock signal and a regular sampling mode where the event sequence data is sampled at a regular rate by another sampling clock signal having the same period as the input clock signal, and further a regular packetizing section operates under the regular sampling mode for generating a packet of the inputted event sequence data in response to only one of the leading edge and the trailing edge of the input clock signal and adds the timestamp every time the predetermined number of data blocks are packetized by the regular packetizing section.
According to the invention, a packet receiving apparatus receives packets from transmitting nodes located on a network to reproduce event sequence data, the packet containing at least one data block composed of at least one event sequence data and a timestamp added per a predetermined number of data blocks. The packet receiving apparatus comprises a receiving section that sequentially receives packets transmitted from one or more of the transmitting node, a fast unpacketizing section that operates in response to a reproduction clock signal having a leading edge and a trailing edge arranged at a predetermined period for retrieving event sequence data from a packet at the leading edge of the reproduction clock signal and for retrieving event sequence data from a next packet at the trailing edge subsequent to the leading edge, thereby successively unpacketizing the packets at a rate twice as fast as the reproduction clock signal, and a data output section that reproduces the event sequence data in response to the reproduction clock signal which is synchronized to the timestamps contained in the received packets.
Preferably, the packet receiving apparatus further comprises a regular unpacketizing section that retrieves event sequence data from a packet at only one of the leading edge and the trailing edge of the reproduction clock signal, thereby successively unpacketizing the packets at the same rate as the reproduction clock signal, and a switching section that switches between the fast unpacketizing section and the regular unpacketizing section according to information which is contained in the received packets and which indicates a sampling period of the event sequence data.
According to the invention, a packet receiving apparatus receives packets from one or more of transmitting nodes located on a network, the packet containing at least one data block composed of at least one event sequence data and a timestamp added per a predetermined number of data blocks. The apparatus comprises a timestamp output section that retrieves a timestamp from a packet which is received from one of the transmitting nodes, a reproduction timing clock generating section that generates a reproduction timing clock used for synchronously reproducing the event sequence data contained in the received packet, a comparing section that compares a time indicated by the timestamp retrieved by the timestamp output section with a current time indicated by an internal cycle timer so as to phase-lock the reproduction timing clock to the time of the timestamp, and a data output section that reproduces the event sequence data contained in the received packets in synchronization to the reproduction timing clock.
According to the invention, a packet receiving apparatus receives packets from one or more of transmitting nodes located on a network, the packet containing at least one data block composed of at least one event sequence data and a timestamp added per a predetermined number of data blocks. The apparatus comprises a timestamp output section that retrieves a timestamp from a packet which is received from the transmitting node, a reproduction timing clock generating section that generates a reproduction timing clock which is synchronized to the retrieved timestamp, a data output section that reproduces the event sequence data contained in packets received from each transmitting node in response to the reproduction timing clock, and a time adjusting section that operates when a time indicated by the timestamp retrieved by the timestamp output section coincides with a current time indicated by an internal cycle timer for controlling the data output section to reproduce a data block of the event sequence data which is contained in the same packet as the timestamp and which corresponds to the time indicated by the timestamp. The data output section has a plurality of receiving buffers for writing therein the event sequence data, the receiving buffers being separately allotted to different transmitting nodes and further being assigned to different channels of the event sequence data contained in each packet, thereby reproducing the event sequence data from the receiving buffers a channel by channel in response to the reproduction timing clock.
According to the invention, a packet receiving apparatus receives a packet from one or more of transmitting node located on a network, the packet containing at least one data block composed of at least one event sequence data and a timestamp added per a predetermined number of data blocks. The apparatus comprises a reproduction timing clock generating section that generates a reproduction timing clock in synchronization to the timestamp contained in the packet, a data output section that reproduces each data block of event sequence data contained in the packet received from the transmitting node in response to the reproduction timing clock, and an output terminal provided to output the generated reproduction timing clock for external use of the reproduction timing clock.
The above and other objects, features and advantages of the present invention and the manner of realizing them will become more apparent, and the invention itself will best be understood from a study of the following description and appended claims with reference to the attached drawings showing some preferred embodiments of the invention.